home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-04-20 | 466 b | 17 lines |
- import java.io.*;
-
- class Gaps {
- public static void main(String[] args) throws Exception {
- File f = new File("Gaps.test");
- RandomAccessFile out = new RandomAccessFile(f, "rw");
- out.writeBytes("1 3 5");
- System.out.println("len is " + out.length());
-
- // Supply the missing code here to write out "2" and "4"
- // in the gaps in the character "1 3 5" already written to
- // the file.
-
- out.close();
- }
- }
-